<template>
    <div class="app">
        <div class="left_content">
            <div class="left-bottom-header" @click="this.$router.push('/')">
                <div class="left-bottom-imgs"><img src="../../assets/icon/house.png" alt=""></div>
                <p>首页</p>
            </div>
            <div class="left-bottom-header">
                <div class="left-bottom-imgs"><img src="../../assets/icon/book.png" alt=""></div>
                <p>重大任务</p>
            </div>
            <div class="content-header">
                <div class="content-imgs"><img src="../../assets/icon/hotel.png" alt=""></div>
                <span class="content-header-p">社会空间</span>
            </div>
            <div class="content-header" v-for="(item, index) in rightdata" :key="index" @click="gotopage(item)">
                <div class="content-imgs"></div>
                <span v-if="item.name === pathdata" class="content-header-p1">{{item.title}}</span>
                <span v-else class="content-header-p">{{item.title}}</span>
            </div>
            <div class="content-header">
                <div class="content-imgs"><img src="../../assets/icon/space.png" alt=""></div>
                <span class="content-header-p">多跨场景应用多</span>
            </div>
            <div class="content-header" v-for="(item, index) in rightdata2" :key="index" @click="gotopage(item)">
                <div class="content-imgs"></div>
                <span v-if="item.name === pathdata" class="content-header-p1">{{item.title}}</span>
                <span v-else class="content-header-p">{{item.title}}</span>
            </div>
            <div class="content-header">
                <div class="content-imgs"><img src="../../assets/icon/project.png" alt=""></div>
                <span class="content-header-p">重点项目</span>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return {
            rightdata:[
            { title:'未来社区',name:'culture'},
            { title:'数字乡村', name:'education'},
            ],
            rightdata2:[
            { title:'智慧养老', name:'agedService'},
            { title:'心灵驿站', name:'KyOrganization'},
            { title:'云上夕阳空', name:'aged'},
            ],
            pathdata:null
        }
    },
    methods:{
        gotopage(item){
            this.pathdata = item.name
            const name = item.name
            this.$router.push({
                name
            })
        }
    }
}
</script>
<style lang="less" scoped>
.left_content{
    background-color: #fff;
    width: 200px;
    height: 850px;
            .left-bottom-header{
            margin-left: 5px;
            height:45px;
            font-size: 20px;
            padding-top: 22px;
            font-weight: bold;
            display: flex;
            .left-bottom-imgs{
                width: 25px;
                height: 25px;
                margin-right: 10px;
                img{
                    width: 100%;
                    height: 100%;
                }
            }
            p{  
                font-size: 22px;
            }       
        }
        .content-header{
        margin-left: 30px;
        height:45px;
        padding-top: 22px;
        display: flex;
        .content-imgs{
            width: 25px;
            height: 25px;
            margin-right: 10px;
            img{
                width: 100%;
                height: 100%;
            }
        }
        .content-header-p{
            // line-height: 40px;
            font-size: 18px;
        }
        .content-header-p1{
            color: #3E74E3;
            // line-height: 40px;
            font-size: 18px;
        }     
    }
}
</style>